//
//  ST_SuspendVoiceCountdownView.swift
//  btvideo
//
//  Created by Jason on 2021/8/5.
//  Copyright © 2021 JarvanZhang. All rights reserved.
//

import UIKit

class ST_SuspendVoiceCountdownView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.backgroundColor = .white
        self.cornerRadius = 8
        
        self.addSubview(icon)
        self.addSubview(titleLabel)
        
        icon.snp.makeConstraints { make in
            make.width.height.equalTo(18)
            make.top.equalToSuperview().offset(12)
            make.centerX.equalToSuperview()
        }
        
        titleLabel.snp.makeConstraints { make in
            make.centerX.equalToSuperview()
            make.height.equalTo(18)
            make.bottom.equalToSuperview().offset(-8)
        }
        
        
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    fileprivate lazy var icon:UIImageView = {
        let v = UIImageView(image: ST_ImageUtils.imageName("suspend_voice_icon"))
        return v
    }()
    
    fileprivate lazy var titleLabel:UILabel = {
        let l = UILabel()
        l.textColor = #colorLiteral(red: 0.9960784314, green: 0.7607843137, blue: 0.02745098039, alpha: 1)
        l.font = UIFont.systemFont(ofSize: 13, weight: .semibold)
        l.textAlignment = .center
        return l
    }()
    
    
    func bind(seconds:String)  {
        titleLabel.text = seconds
    }
    
}
